package com.yuhs.zixing.pay.web.controller.merchant.convert;

import com.yuhs.zixing.pay.dal.merchant.dto.PayMerchantInfoDTO;
import com.yuhs.zixing.pay.web.controller.merchant.vo.res.MerchantInfoVO;
import org.springframework.beans.BeanUtils;

/**
 * @ClassName MerchantConvertHelper
 * @Description 商户转换
 * @Author yuhs
 * @CreateDate 2020/12/6
 **/
public class MerchantConvertHelper {

    /**
     * 添加商户 VO 转换为DTO
     *
     * @param merchantInfoVO
     * @return
     */
    public static PayMerchantInfoDTO addMerchantVO2DTO(MerchantInfoVO merchantInfoVO) {
        PayMerchantInfoDTO payMerchantInfoDTO = new PayMerchantInfoDTO();
        BeanUtils.copyProperties(merchantInfoVO, payMerchantInfoDTO);
        return payMerchantInfoDTO;
    }
}
